<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s"  uri="/struts-tags"%>


<title><s:if test='FLAG=="EDIT"'>『编辑』</s:if><s:else>『添加』

</s:else>&nbsp;法人管理信息</title><span id="navlink"> 企业客户信息 >> 法人管理信息</span>

<script type="text/javascript"src="<%=request.getContextPath()%>/js/custom/companymanage.js"></script>
<script type="text/javascript" src="<%=request.getContextPath()%>/js/common/numdiv.js"></script>   <s:if test='#session.eflage=="show"'> <style type="text/css">	select {border:0;-webkit-appearance: none;} </style> </s:if>
<style type="text/css">
.ftab ul li{padding:0 10px;float:left;font-weight:bold;}
.ftab a{color:black}
.ftab a:hover{text-decoration:underline;}
</style>


<script>
  $(function() {
    $( "#accordion" ).accordion({
      collapsible: true
    });
  });
 </script>

<div id="accordion" style="width:auto">
  <h3>客户信息登记</h3>
  <div class="ftab">
    <ul >
			<li><a href="customShow!companyread">基本信息</a></li>
			<li><a href="customList!contactlist">联系信息</a></li>
			<li><a href="customList!topmanagerlist">高管信息</a></li>
			<li><a href="customList!prosecutedlist">被起诉信息</a></li>
			<li><a href="customList!investorlist">投资人信息</a></li>
			<li><a href="customList!foreigninvestorlist">对外投资信息</a></li>
			<!-- 
			<li><a href="customList!guarantorlist">法人保证人专用信息表</a></li>
			 -->
			<li><a href="customList!pledgercompanylist">抵质押清单信息</a></li>			
		
			<li><a href="customList!managelist">管理信息</a></li>	
					
			<li><a href="customList!externalguaranteelist">对外担保信息</a></li>
			<!-- 
			<li><a href="NewCompanyOtherrelation">法人其他关联关系表</a></li>
			 -->
			 
			<li><a href="customList!otherloanlist">其他借款</a></li>
			 
			<li><a href="customList!bankcreditlist">银行信贷信息</a></li>
			
			
			
			<li><a href="customList!cashflowlist">现金流量表</a></li>
			<li><a href="customList!assetsdebtlist">资产负债表</a></li>
			<li><a href="customList!profitlist">损益表表</a></li>	
			 <li><a href="upload!filelist?listtype=1">客户基础资料归档目录</a></li>
			 <li><a href="upload!filelist?listtype=2">客户必备资料归档目录</a></li>			
				<!-- <li><a href="./ListCompanyPledger!getCompanyPledgerList">抵押清单信息</a></li> -->			
		</ul>
  </div>
</div>
<div class="clear"></div>
<div id="msg"></div>



<form name="newCompanyManage" action="customActionDo!managesave" method="post" id="form">
<input type="hidden" name="cmanage.id" value="${cmanage.id }" />
<table class="table_box table_all_border" cellspacing="0" cellpadding="0">
<tr>
<td align="right">客户ID</td>
<td colspan="3">
RF02<input type="text" class="companyid" readonly="readonly" name="cmanage.cid" value="${sessionScope.companyid}" />
</td>
</tr>
<tr>
<th><span class="need"></span>从业人数</th>
<td><input type="text" name="cmanage.employeesnumber"  value="${cmanage.employeesnumber }" /></td>
<th><span class="need"></span>经营场地所有权</th>
<td><select name="cmanage.placeofbusinessownershipx" id="dd8a"></select>
</tr>
<tr>
<th><span class="need"></span>主要产品情况</th>
<td><input type="text" name="cmanage.mainproducts" value="${cmanage.mainproducts}" /></td>
</td>
<tr>
<th><span class="need"></span>经营场地面积</th>
<td><input type="text" name="cmanage.businessareax" value="${cmanage.businessareax}" /></td>
<th><span class="need"></span>管理特征</th>
<td><select name="cmanage.managementcharacteristics" id="dd9a"></select></td>
</tr>
<tr>
<th><span class="need"></span>企业类型</th>
<td><select name="cmanage.companytype" id="dd10a"></select>  </td>
<th><span class="need"></span>产业政策</th>
<td><select name="cmanage.industrialpolicy" id=dd11a></select> </td>
</tr>
<tr>
<th><span class="need"></span>经营状况</th>
<td><select name="cmanage.businessconditions" id="dd12a"></select>  </td>

<th><span class="need"></span>改制重组形式</th>
<td><select name="cmanage.reorganizationform" id="dd13a"></select>  </td>
</tr>
<tr>
<th><span class="need"></span>改制/关停/破产日期</th>
<td><input type="text"class="datepicker"  readonly="readonly" name="cmanage.restructuringdate" value="<s:date name="cmanage.restructuringdate" format="yyyy-MM-dd" />" /></td>
<th><span class="need"></span>经营场地所有权</th>
<td><select name="cmanage.placeofbusinessownershipy" id="dd8b"></select>  </td>

</tr>
<tr>
<th><span class="need"></span>经营场地面积</th>
<td><input type="text" name="cmanage.businessareay" value="${cmanage.businessareay}" /></td>
<th><span class="need"></span>生产经营许可证名称</th>
<td><input type="text" name="cmanage.pblicensename" value="${cmanage.pblicensename}" /></td>
</tr>
<tr>
<th><span class="need"></span>生产经营许可证号码</th>
<td><input type="text" name="cmanage.pblicensenumber" value="${cmanage.pblicensenumber}" /></td>
<th><span class="need"></span>生产经营许可证年检日期</th>
<td><input type="text"  name="cmanage.pbinspectiondatey" value="${cmanage.pbinspectiondatey }" />年<input type="text"  name="cmanage.pbinspectiondatem" value="${cmanage.pbinspectiondatem }" />月<input type="text"  name="cmanage.pbinspectiondated" value="${cmanage.pbinspectiondated }" />日</td>
</tr>
<tr>
<th><span class="need"></span>房地产企业资质</th>
<td><select name="cmanage.estatequality" id="dd14a"></select>  </td>
<th><span class="need"></span>房地产企业资质评定日期</th>
<td><input type="text"class="datepicker"  readonly="readonly" name="cmanage.estatequalitystartdate" value="<s:date name="cmanage.estatequalitystartdate" format="yyyy-MM-dd" />" /></td>
</tr>
<tr>
<th><span class="need"></span>房地产企业资质到期日期</th>
<td colspan="3"><input type="text"class="datepicker"  readonly="readonly" name="cmanage.estatequalityenddate" value="<s:date name="cmanage.estatequalitystartdate" format="yyyy-MM-dd" />" /></td>
</tr>


<tr>
<th><span class="need"></span>付款银行行名称</th>
<td><input type="text" name="cmanage.draweebank" value="${cmanage.draweebank}" /></td>
<th><span class="need"></span>付款银行账号</th>
<td><input type="text"  name="cmanage.draweebankid" value="${cmanage.draweebankid }" /></td>
</tr>


</table>
<br />
<br />
<table class="table_box table_all_border" id="bankInfor">
<tr>
	<th colspan="4">银行基本开户信息</th><th><input type="button" value="增加" id="addBank"/></th>
</tr>
<s:if test='FLAG=="EDIT"'>
<s:iterator value="lcbankList" status="index" var="var">
	<tr>
		<th><span class="need"></span>本币基本开户银行</th>
		<td><s:textfield name="basicbank" value="%{bankname}"/></td>
		<th><span class="need"></span>本币基本存款账号</th>
		<td><s:textfield name="basicdepositbank" value="%{saveaccount}"/></td>
		<th style="width:10%"><input type="button" value="删除" onClick="getDel(this)"/></th>
	</tr>
</s:iterator>
</s:if>
</table>

<div id="button_area">
<div><input type="submit" value="保存"/></div>
</div>
</form>

<input type="hidden" id="eflage" name="eflage" value="${sessionScope.eflage }" />
<script type="text/javascript">
<!--
	$(document).ready(function(){
		if($("#eflage").val() === 'show'){
			$("input[type='text']").prop("readonly", true);
			$("input[type='select']").prop("disabled", true);
			$("input[type='text']").addClass("companyid");
			//$("input[type='select']").addClass("companyid");
			$("#button_area").hide();
			$("#left_area").hide();
			$(".del").hide();
			$(".smodify").html('浏览');
			
		}
	});
//-->
</script>


<script type="text/javascript">
<!--
	$("#addBank").click(function(){
			var bankTab = $("#bankInfor");
				bankTab.append("<tr><th><span class='need'></span>本币基本开户银行</th><td><input type='text' name='basicbank' value='' /></td><th><span class='need'></span>本币基本存款账号</th><td><input type='text' name='basicdepositbank' value='' /></td><th style='width:10%''><input type='button' value='删除' onClick='getDel(this)'/></th></tr>"); 
		});
		function getDel(keepInfor){
				$(keepInfor).parent().parent().remove();
				};
//-->
</script>


 <script type="text/javascript">  
    $(function(){
    	newSelect("dd8a","findComList?ty=8",${cmanage.placeofbusinessownershipx }0);
    	newSelect("dd8b","findComList?ty=8",${cmanage.placeofbusinessownershipy }0);
    	newSelect("dd9a","findComList?ty=9",${cmanage.managementcharacteristics }0);
    	newSelect("dd10a","findComList?ty=10",${cmanage.companytype }0);
    	newSelect("dd11a","findComList?ty=11",${cmanage.industrialpolicy }0);
    	newSelect("dd12a","findComList?ty=12",${cmanage.businessconditions }0);
    	newSelect("dd13a","findComList?ty=13",${cmanage.reorganizationform }0);
    	newSelect("dd14a","findComList?ty=14",${cmanage.estatequality 	 }0);
    	
    	
    });
    
    function newSelect(thisid,thisfun,def){
    	var parentid="#"+thisid;
    	var purl = "dropdown!"+ thisfun;
    	appendOption(purl,"",parentid,def);
	}
    function appendOption(thisurl,thisdata,thisid,defaultvalue){
        $.ajax({  
            cache:false,  
            url:thisurl,  
            type:'post',  
            dataType:'json',
            data:thisdata,
          	error: function(XMLHttpRequest, textStatus, errorThrown) {
				//alert(textStatus);
	        },
			success: function(data){
				$(thisid).empty();
				var i;
				var dataLists = eval(data);
				var dataLength=dataLists.length;
				//$(thisid).append("<option value='0'>--------------请选择-----------------</option>");
				for (i = 0; i < dataLength; i++) {
					$(thisid).append("<option value='"+dataLists[i].id+"'>"+dataLists[i].name+"</option>");  
				}
				
				$(thisid).val(defaultvalue/10);
			}
    	});
    }
</script>



